package lumis.portal.serialization;

import java.util.List;

import lumis.portal.manager.ManagerException;
import lumis.portal.stability.StableMinor;
import lumis.util.IResource;

/**
 * General exception for serialization problems
 *
 * @version $Revision: 13082 $ $Date: 2011-05-27 16:03:12 -0300 (Fri, 27 May 2011) $
 * @since 4.0.7
 */
@SuppressWarnings("serial")
@StableMinor(version = "6.0", sinceVersion = "4.0")
public class SerializationException extends ManagerException
{
	private final boolean notifyProgress;
	
	public SerializationException(String arg0)
	{
		this(arg0, new SerializationStringResource(), true);
	}

	public SerializationException(String arg0, boolean notifyProgress)
	{
		this(arg0, new SerializationStringResource(), notifyProgress);
	}

	public SerializationException(String arg0, Exception innerException)
	{
		this(arg0, new SerializationStringResource(), innerException, true);
	}

	public SerializationException(String arg0, Exception innerException, boolean notifyProgress)
	{
		this(arg0, new SerializationStringResource(), innerException, notifyProgress);
	}

	public SerializationException(String arg0, IResource resource)
	{
		this(arg0, resource, true);
	}

	public SerializationException(String arg0, IResource resource, boolean notifyProgress)
	{
		super(arg0, resource);
		this.notifyProgress = notifyProgress;
	}

	public SerializationException(String arg0, List<IResource> resources)
	{
		this(arg0, resources, true);
	}

	public SerializationException(String arg0, List<IResource> resources, boolean notifyProgress)
	{
		super(arg0, resources);
		this.notifyProgress = notifyProgress;
	}

	public SerializationException(String arg0, IResource resource, Exception innerException)
	{
		this(arg0, resource, innerException, true);
	}

	public SerializationException(String arg0, IResource resource, Exception innerException, boolean notifyProgress)
	{
		super(arg0, resource, innerException);
		this.notifyProgress = notifyProgress;
	}

	public SerializationException(String arg0, List<IResource> resources, Exception innerException)
	{
		this(arg0, resources, innerException, true);
	}

	public SerializationException(String arg0, List<IResource> resources, Exception innerException, boolean notifyProgress)
	{
		super(arg0, resources, innerException);
		this.notifyProgress = notifyProgress;
	}

	public boolean isNotifyProgress()
	{
		return notifyProgress;
	}
}
